Automatic Generation of Precise and Useful Commutativity Conditions
نویسندگان
چکیده
Reasoning about commutativity between data-structure operations has been, and remains, an important problem with applications including parallelizing compilers, optimistic parallelization and, more recently, Ethereum smart contracts. There have been research results on automatic generation of commutativity conditions, yet we are unaware of any fully automated technique to generate conditions that are both sound and effective (i.e., not overly conservative). We take a first step in this direction. We have designed such a technique, driven by an algorithm that iteratively refines a conservative approximation of the commutativity (and non-commutativity) condition for a pair of methods into an increasingly precise version. The algorithm terminates if/when the entire state space has been considered, and can be aborted at any time to obtain a partial yet sound commutativity condition. We have generalized our work to left-/right-movers [25] and proved relative completeness. We describe aspects of our technique that lead to useful commutativity conditions, including how predicates are selected during refinement and heuristics that impact the output shape of the condition. We have implemented our technique in a prototype open-source tool called Servois. Our algorithm produces quantifier-free queries that are dispatched to a back-end SMT solver. We evaluate Servois through two case studies: (i) We synthesize commutativity conditions for a range of data structures including Set, HashTable, Accumulator, Counter, and Stack. (ii) We consider an Ethereum smart contract called BlockKing, and show that Servois can detect serious concurrency-related vulnerabilities and guide developers to construct robust and efficient implementations.
منابع مشابه
Automatic Generation of Precise and Useful Commutativity Conditions (Extended Version)
Reasoning about commutativity between data-structure operations is an important problem with applications including parallelizing compilers, optimistic parallelization and, more recently, Ethereum smart contracts. There have been research results on automatic generation of commutativity conditions, yet we are unaware of any fully automated technique to generate conditions that are both sound an...
متن کاملAutomatic Design of Persian Typefaces
In this paper , a fast method for automatic generation and scientific design of Persian letters is proposed. Scientific typeface design is an approach in which fonts are described by mathematical curves with well-defined parameters, where these parameters can be automatically tuned. METAFONT is a language suitable for the type of design used in this work. This language is particularly useful i...
متن کاملAutomatic Design of Persian Typefaces
In this paper
, a fast method for automatic generation and scientific design of Persian letters is proposed. Scientific typeface design is an approach in which fonts are described by mathematical curves with well-defined parameters, where these parameters can be automatically tuned. METAFONT is a language suitable for the type of design used in this work. This language is particularly useful...
متن کاملSimulation of Store Separation using Low-cost CFD with Dynamic Meshing
The simulation of the store separation using the automatic coupling of dynamic equations with flow aerodynamics is addressed. The precision and cost (calculation time) were considered as comparators. The method used in the present research decreased the calculation cost while limiting the solution error within a specific and tolerable interval. The methods applied to model the aerodynamic force...
متن کاملAutomatic Workflow Generation and Modification by Enterprise Ontologies and Documents
This article presents a novel method and development paradigm that proposes a general template for an enterprise information structure and allows for the automatic generation and modification of enterprise workflows. This dynamically integrated workflow development approach utilises a conceptual ontology of domain processes and tasks, enterprise charts, and enterprise entities. It also suggests...
متن کامل